﻿namespace EFS.RC.CC.Deployment.Config
{
	public static class Settings
	{
		#region Composition
		private static System.Boolean loaded = false;
		#endregion

		#region LoadConfiguration
	
		/// Load
		private static void Load()
		{
			// read section
			EFS.Common.Config.Reader conf = new EFS.Common.Config.Reader("EFS/CC/Deployment", false);

			// check
			EFS.Common.Verify.Reference(conf, "conf EFS/CC/Deployment");

			// set
			connectionString = conf.GetAttributeString("connectionString");

			// loaded
			loaded = true;
		}
		#endregion

		#region Properties
		/// Property ConnectionString: Get
		private static System.String connectionString = null;
		public static System.String ConnectionString
		{
			get
			{
				if (!loaded) { Load(); }
				return connectionString;
			}
		}
		#endregion
	}

}